﻿<article class="introduction">
    <header class="container">
        <h2 style="border-bottom: 1px solid #EEEEEE; padding-bottom: 10px">Contribute to BlogEngine.NET Gallery</h2>
    </header>
</article>
<div class="col-md-6">
    <div class="box-well post-list">
        <h3>Upload form</h3>
        <div style="margin-top: 15px">
            <div>
                @if (!string.IsNullOrEmpty(ViewBag.Message))
                {
                    if (ViewBag.Success)
                    {
                        <div class="alert alert-success">@ViewBag.Message</div>
                    }
                    else
                    {
                        <div class="alert alert-danger">@ViewBag.Message</div>
                    }
                }
                @using (Html.BeginForm("Upload", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
                {
                    <div>NuGet package file (.nupkg, required) </div>
                    <div style="margin: 5px 0 15px 0">
                        <input type="File" name="pkgFile" id="pkgFile" value="Choose File" />
                    </div>
                    <div>Image file for package logo (optional, 160x160 px for best results)</div>
                    <div style="margin: 5px 0 15px 0">
                        <input type="File" name="imgFile" id="imgFile" value="Choose File" />
                    </div>
                    <div>Email (optional, to notify you when package published)</div>
                    <div style="margin: 5px 0 15px 0">
                        <input type="text" class="form-control" style="width: 240px" name="txtEmail" id="txtEmail" value="" maxlength="150" />
                    </div>
					<p><a href="http://dnbe.net/docs/post/building-nuget-package" target="_new">Please read before uploading</a></p>
                    <button class="btn btn-danger btn-block downloadlink" style="width: 240px" type="submit">Upload</button>
                }
            </div>
            <h4 style="margin-top: 20px">Currently in the queue</h4>
            @if (ViewBag.Uploads != null)
            {
                foreach (var item in ViewBag.Uploads)
                {
                    <p>@item</p>
                }
            }
            
            
            @if (ViewBag.Rejected != null)
            {
                <h4 style="margin-top: 20px">Waiting for resolution</h4>
                foreach (var item in ViewBag.Rejected)
                {
                    <p>@Html.Raw(item)</p>
                }
            }
        </div>
    </div>
</div>
<div class="col-md-6">
    <div class="box-well post-list">
        <h3>About</h3>
        <p>Use this form to upload BlogEngine.NET theme, extension or widget to online gallery. It must be built as NuGet package. Once uploaded, this package will be tested and added to the list of packages available for BlogEngine.NET users.</p>
        <p>
			<a href="http://dnbe.net/docs/post/building-nuget-package" target="_new" title="How to build NuGet package"><img src="/v01/images/pkg.png"></a>
		</p>
		<p>Bloggers using BlogEngine.NET 3.0 and above can add this feed via admin pannel as:</p>
        <pre>http://dnbe.net/v01/nuget</pre>
        <div class="shareblogengine">
            <a href="https://twitter.com/BlogEngineNet" class="twitter-follow-button" data-show-count="false">Follow BlogEngineNet</a>
            <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://dotnetblogengine.net" data-related="BlogEngineNet">Tweet</a>
            <script>!function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https'; if (!d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = p + '://platform.twitter.com/widgets.js'; fjs.parentNode.insertBefore(js, fjs); } }(document, 'script', 'twitter-wjs');</script>
            <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fdotnetblogengine.net&amp;width=100&amp;layout=button_count&amp;action=like&amp;show_faces=true&amp;share=true&amp;height=21" scrolling="no" frameborder="0" style="border: none; overflow: hidden; width: 160px; height: 21px;" allowtransparency="true"></iframe>
        </div>
    </div>
</div>
<script type="text/javascript">
    var uvOptions = {};
    (function () {
        var uv = document.createElement('script'); uv.type = 'text/javascript'; uv.async = true;
        uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'widget.uservoice.com/5zYbVWxcxGlBubEb6NvQ1A.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uv, s);
    })();
</script>
<div id="fb-root"></div>
<script type="text/javascript">
    (function (d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
</script>